<% layout('layout') -%><!--加载全局布局文件-->
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    //编写分享代码
    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: '<%= appId %>', // 必填，公众号的唯一标识
        timestamp: '<%= timestamp %>', // 必填，生成签名的时间戳
        nonceStr: '<%= nonceStr %>', // 必填，生成签名的随机串
        signature: '<%= signature %>',// 必填，签名，见附录1
        jsApiList: [
            'checkJsApi',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ'
        ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });

    wx.ready(function(){
        // alert('dddd');
        // config信息验证后会执行ready方法，所有接口调用都必须在config接口获得结果之后，config是一个客户端的异步操作，所以如果需要在页面加载时就调用相关接口，则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口，则可以直接调用，不需要放在ready函数中。
        var sdata = {
            title: '果然100送iPhone 6S啦！',
            desc: '传递幸运，有一种冬天叫温暖，传递不停，幸运不断！',
            link: '<%=welcomeurl%>',
            imgUrl: 'http://7d9nlm.com1.z0.glb.clouddn.com/logoshare.png',
            success: function () {
                //alert('用户确认分享后执行的回调函数');
            },
            cancel: function () {
                //alert('用户取消分享后执行的回调函数');
            }
        };
        wx.onMenuShareTimeline(sdata);
        wx.onMenuShareAppMessage(sdata);
    });

    wx.checkJsApi({
        jsApiList: ['onMenuShareTimeline'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
        success: function(res) {
            // 以键值对的形式返回，可用的api值true，不可用为false
            // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}

        }
    });
</script>

<!--NgC div start--->
<!--<div id="singday" ng-controller="SginDayAngularCtrl" ng-cloak class="ng-cloak" style="width: 50%;">-->
<!-- 代码 开始 -->
<div>

    <div style="background: #E72C27">
        <a href="/extra/diy/product_list">
            <img src="/images/home/luck_goods_01.png" alt="" style="width: 100%;"/>
        </a>
        <a href="/extra/diy/product_list">
            <img src="/images/home/luck_goods_02.png" alt="" style="width: 100%;"/>
        </a>
        <a href="/extra/diy/product_list">
            <img src="/images/home/luck_goods_03.png" alt="" style="width: 100%;"/>
        </a>
        <a href="/extra/diy/product_list">
            <img src="/images/home/luck_goods_04.png" alt="" style="width: 100%;"/>
        </a>
        <a href="/extra/diy/product_list">
            <img src="/images/home/luck_goods_05.png" alt="" style="width: 100%;"/>
        </a>

        <a href="/extra/diy/product_list">
            <img src="/images/home/luck_goods_06.png" alt="" style="width: 100%;"/>
        </a>
        <img class="am-round am-center" src="<%=image%>" width="80" height="80"/>
        <span class="am-center" style="color: white;text-align: center;"><%=shareName%></span>
        <img src="/images/home/zhuanpan.png" alt="" style="width: 100%;"/>
        <a href="/activity/luckdraw?shareid=<%= shareid %>">
            <img src="/images/home/luck_button_06.png" alt="" style="width: 100%;"  />
        </a>

    </div>
    <div>
        <div style="text-align: center">
            <span class="am-badge am-badge-danger am-round am-text-xl">中奖人数</span>
        </div>
        <div style="background: #E72C27;border-radius: 10px;margin-left: 10px;margin-right: 10px;margin-top: 10px;">
            <ul class="am-list am-list-static">
                <li>
                    <span class="am-text-warning ">一等奖iPhone6s</span>
                    <span class="am-fr am-text-danger am-text-lg">
                        <% if(rewards.iphone !=0){%>
                        <%=rewards.iphone%>人
                        <%}else{%>未送出<%}%>
                    </span>
                </li>
                <li>
                    <span class="am-text-warning ">二等奖iPad mini</span>
                    <span class="am-fr am-text-danger am-text-lg">
                        <% if(rewards.ipad !=0){%>
                        <%=rewards.ipad%>人
                        <%}else{%>未送出<%}%>
                    </span>
                </li>
                <li>
                    <span class="am-text-warning ">三等奖iPod</span>
                    <span class="am-fr am-text-danger am-text-lg">
                        <% if(rewards.ipod !=0){%>
                        <%=rewards.ipod%>人
                        <%}else{%>未送出<%}%>
                    </span>
                </li>
                <li>
                    <span class="am-text-warning ">满100元减10元券</span>
                    <span class="am-fr am-text-danger am-text-lg">
                        <%=rewards.coupon10 || "未送出"%>人</span>
                </li>
                <li>
                    <span class="am-text-warning ">鲜榨果汁</span>
                    <span class="am-fr am-text-danger am-text-lg">
                        <%=rewards.fruit || "未送出"%>人
                    </span>
                </li>
            </ul>
        </div>
        <img src="/images/home/luck_goods_13.png" alt="" style="width: 100%;"/>
        <img src="/images/home/luck_goods_11.png" alt="" style="width: 100%;"/>
    </div>

    <input id="shareid" value="<%= shareid %>" hidden/>

</div>

<!-- 代码 结束 -->
<!--NgC div end--->

<!---启用底部navbar-->
<!--如果本页面有额外的js文件/代码需要加入到head中 使用如下代码-->
<% block('footer').append('<script src="'+CDN+'script/sweetalert-dev.js"></script>') %>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan style='display:none;'  id='cnzz_stat_icon_1257404106'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/stat.php%3Fid%3D1257404106' type='text/javascript'%3E%3C/script%3E"));</script>